#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QCameraViewfinder>
#include "videodevice.h"
#include "videothread.h"
#include "videoencode.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWidget; }
QT_END_NAMESPACE

class MainWidget : public QWidget
{
    Q_OBJECT

public:
    explicit MainWidget(QWidget *parent = nullptr);
    ~MainWidget();

private slots:
    void on_pictureBtn_clicked();

    void on_videoBtn_clicked();

private:
    Ui::MainWidget *ui;
    QCameraViewfinder * m_viewFinder;

    VideoDevice * vd;
    VideoRecordThread * videoThread;
    PictureRecordThread * pictureThread;
};

#endif // MAINWIDGET_H
